home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / soft.key < prev    next >
Text File  |  1995-03-23  |  4KB  |  141 lines

  1. Article 2545 of comp.sys.handhelds:
  2. Path: en.ecn.purdue.edu!noose.ecn.purdue.edu!samsung!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!fs1!fs1.ee.ubc.ca!jthornto
  3. From: jthornto@fs1.ee.ubc.ca (THORNTON JOHAN A)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: New and improved Soft Keys
  6. Summary: fixes
  7. Message-ID: <1451@fs1.ee.ubc.ca>
  8. Date: 25 Nov 90 04:20:22 GMT
  9. Sender: root@fs1.ee.ubc.ca
  10. Reply-To: jthornto@fs1.ee.ubc.ca (THORNTON JOHAN A)
  11. Organization: Dept. of Electrical Engineering University of B.C.
  12. Lines: 125
  13.  
  14. OK, I've rewritten the Soft Keys program.  It now fits in 86 bytes (or as
  15. low as 51 bytes) instead of 208 bytes.  It also uses shift and alpha
  16. combinations.
  17.  
  18. ----
  19.  
  20. This is my "Soft Keys" application.
  21.  
  22. The ability to redefine keys on the 48SX is invaluable.  But many users
  23. quickly find themselves out of keys - there are only so many keys you
  24. "don't really need."  That's where Soft Keys come in.  By redefining only
  25. one key to run the KEYS program, it doesn't tie up user keys while
  26. allowing the whole keyboard to be given new functionality.  A good suggestion
  27. for the [SOFT] key is [BLUE]-[UP].
  28.  
  29. The KEYS program needs KLIST, which contains a list of programs and their
  30. assigned "soft keys".  The format for KLIST is essentially the same as for
  31. the built in user key assignments:
  32.  
  33.  { \<< program for key #aa.a \>> aa.a \<< program for key #bb.b \>> bb.b ... }
  34.  
  35. where aa.a, bb.b are the standard key addresses (see p. 217).
  36.  
  37. The KASN program is similar to the ASN command.  It takes a program in level
  38. 2 and a key address in level 1.  You can also edit and store (or visit) KLIST.
  39.  
  40. The program makes no attempt at sorting the keys, or removing duplicate
  41. key definitions.  That's your duty.  Also, it'll probably crash if you
  42. screw up while editing KLIST.  Error checking takes too much memory.
  43.  
  44. INSTALLATION:  Put KEYS, KASN and KLIST in your HOME directory.  Then
  45. define the KEYS program to [blue] [up]:
  46.  
  47.   'keys' 25.3 ASN
  48.  
  49. Alternately, put the program on the stack ([blue] [KEYS]), do 25.3 ASN, and
  50. then purge KEYS.  Then you can recall KASN and soft-define it to K:
  51.  
  52.   [blue] [KASN] 25.1 KASN
  53.  
  54. and purge KASN.  Then the only thing you need in the HOME directory is KLIST.
  55.  
  56. Make sure you're always in user mode.
  57.  
  58. Have fun.
  59.  
  60.  
  61.  
  62. @ KEYS - the soft key program
  63. %%HP: T(3)A(D)F(.);
  64. \<<
  65. "Press soft key..."      @ You can remove the "..." 1 DISP if you like
  66. 1 DISP KLIST DUP 0
  67. WAIT POS 1 -
  68.   IFERR GET
  69.   THEN DROP2
  70.   ELSE EVAL
  71.   END
  72. \>>
  73.  
  74. @ KASN - key assign
  75. %%HP: T(3)A(D)F(.);
  76. \<< 'KLIST' STO+
  77. 'KLIST' STO+
  78. \>>
  79.  
  80. @ Here's part of my KLIST.  Use as a base.
  81. %%HP: T(3)A(D)F(.);
  82. {
  83. \<< ASC\->
  84. \>> 11.1
  85. \<< SEND
  86. \>> 41.1
  87. \<< -49 FS?
  88.   IF
  89.   THEN -50 CF -49
  90. CF
  91.   ELSE -50 SF -49
  92. SF -45 SF -46 SF
  93. -47 CF -48 CF
  94.   END
  95. \>> 15.1             @ Toggle floating and 3 place engineering modes
  96. \<< -63 FC?C
  97.   IF
  98.   THEN -63 SF
  99. "Active" 1 DISP 1
  100. FREEZE
  101.   END
  102. \>> 44.1             @ Toggle vectored enter
  103. \<< -40 FC?C
  104.   IF
  105.   THEN -40 SF
  106.   END
  107. \>> 72.1             @ Toggle time (the clock)
  108. \<< MAIN FUN CHIP
  109. 2 MENU
  110. \>> 21.1             @ Go to my games directory
  111. \<< PUSHD
  112. \>> 24.2
  113. \<< POPD
  114. \>> 24.3
  115. \<< PICT STO { }
  116. PVIEW
  117. \>> 34.1             @ View the GROB (_P_icture) on level 1
  118. \<< BYTES SWAP DROP
  119. \>> 12.1             @ How big is it?
  120. \<< MAIN TEMP 2 MENU
  121. \>> 42.1             @ Go to TEMPorary directory
  122. \<< DUP CRDIR EVAL
  123. \>> 14.1 }           @ Create and go to new subdirectory
  124.  
  125.  
  126.  
  127. All the stuff about not being responsible if this program causes your
  128. corporation to go bankrupt, bridges to fall down and robots go on a
  129. murdering rampage applies.
  130.  
  131. Thanks to Jan Brittenson and John Paul Morrison.
  132.  -------  _/__/   -----------------------------------------------------
  133.         _|  ___|    E l e c t r i c a l      |  Johan Thornton, Esq.
  134.        | | |_/     E n g i n E E r i n g     |-------------------------
  135.        |/|  __|     U n i v e r s i t y      |  jthornto@fs1.ee.ubc.ca
  136.        |-| |/__     o f   B r i t i s h      |-------------------------
  137.        | |_____|      C o l u m b i a        |   This space for rent
  138.  ----  |__|/_|   ------------------------------------------------------
  139.  
  140.  
  141.